﻿using BCEntity.TMS.MoveHouseConfig.MoveHouseServiceConfig;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCData.TMS.MoveHouseConfig.MoveHouseServiceConfig
{
    public interface IMoveHouseServiceConfigData
    {

        /// <summary>
        /// 服务名称是否存在
        /// </summary>
        /// <param name="serviceName">服务名称</param>
        /// <param name="moveHouseServiceConfigId">服务id</param>
        /// <returns></returns>
        Task<bool> IsExist(string serviceName, long? moveHouseServiceConfigId);

        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="entity">搬家服务配置</param>
        /// <returns></returns>
        Task<MoveHouseServiceConfigEntity> InsertAsync(MoveHouseServiceConfigEntity entity);
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="entity">搬家服务配置</param>
        /// <returns></returns>
        Task<MoveHouseServiceConfigEntity> UpdateAsync(MoveHouseServiceConfigEntity entity);
        /// <summary>
        /// 获取信息
        /// </summary>
        /// <param name="moveHouseServiceConfigId">搬家服务配置id</param>
        /// <returns></returns>
        Task<MoveHouseServiceConfigEntity> GetSingle(long moveHouseServiceConfigId);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="moveHouseServiceConfigId">搬家服务配置id</param>
        /// <returns></returns>
        Task<int> DeleteAsync(long moveHouseServiceConfigId);
        /// <summary>
        /// 获取列表
        /// </summary>
        /// <param name="isEnabled">是否可用</param>
        /// <returns></returns>
        Task<IEnumerable<MoveHouseServiceConfigEntity>> GetList(bool? isEnabled);
        /// <summary>
        /// 分页
        /// </summary>
        /// <param name="isEnabled">是否可用</param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<(IEnumerable<MoveHouseServiceConfigEntity>, int)> Query(bool? isEnabled, string serviceName, DateTime? createStartDate,
             DateTime? createEndDate, int pageIndex, int pageSize);
    }
}
